<script src="__PUBLIC__/js/jquery-1.8.3.js"></script>
<script src="__PUBLIC__/js/global.js"></script>
<script src="__STATIC__/js/jquery.artalert.js"></script>
<link href="__ROOTMU__/favicon.ico" mce_href="favicon.ico" rel="bookmark" type="image/x-icon" /> 
<link href="__ROOTMU__/favicon.ico" mce_href="favicon.ico" rel="icon" type="image/x-icon" /> 
<link href="__ROOTMU__/favicon.ico" mce_href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="360-site-verification" content="bc30cb90bf7437acf5b4b65c23cb0c88" />
<meta name="baidu-site-verification" content="1t2u4276cx" />
<link rel="stylesheet" type="text/css" href="__STATIC__/css/index.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/css/style.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/iconfont.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/pagelist.css">
<script src="__PUBLIC__/js/layer3/layer.js"></script>
<script src="__STATIC__/js/global.js?id=2"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/js/layer3/theme/default/layer.css">
<!--最顶部-->

<!--<link rel="stylesheet" type="text/css" href="__STATIC__/css/homehtmleaf-demo.css">-->
<script>
		// ajax 删除购物车的商品
$(function() {
	$(".navigation_top").click(function(){

		ajax_hide_top();
	});		
	$(".closeheader").click(function(){
		ajax_hide_top();
	});		
});


function ajax_hide_top()
{
			$.ajax({
				type : "POST",
				url:"{:U('Home/Index/ajaxHideTop')}",//+tab,
				data:"", // 
				dataType:'json',		
				success: function(data){
				   if(data.status == 1)	
				   {	
				   		//国旗旁logo
				   		$(".sitetopbarlogo").css("display","block");
						$(".navigation").addClass("navh56");
						
				   		$(".navigation_top").css("display","block");
						$(".headertop").slideUp(500);
					}
					else if(data.status == 2)	
					{
						//隐藏头部
				   		//国旗旁logo
				   		$(".sitetopbarlogo").css("display","none");
						$(".navigation").removeClass("navh56");
						
				   		$(".navigation_top").css("display","none");
						$(".headertop").slideDown(500);
					}
				}
			});
			//$.artTip('隐藏成功', 800)
		
	
	
}
</script>

<script>
$(function(){
    var active_li = '{$active}';
    if(active_li){
        $('li').remove('curr-res');
        $('#'+active_li).addClass('curr-res');
    }
   	
    var uname= getCookie('uname');
    if(uname == ''){
    	$('.islogin').remove();
    	$('.nologin').show();
    }else{
    	$('.nologin').remove();
    	$('.islogin').show();
    	$('.userinfo').html(decodeURIComponent(uname));
    }
//    get_cart_num();
})



function get_cart_num(){
	  var cart_cn = getCookie('cn');
	  if(cart_cn == ''){
		$.ajax({
			type : "GET",
			url:"/index.php?m=Home&c=Cart&a=header_cart_list",//+tab,
			success: function(data){								 
				cart_cn = getCookie('cn');		
				$('#cart_quantity').html(cart_cn);
			}
		});	
	  }
	  $('#cart_quantity').html(cart_cn);
}
/**
* 鼠标移动端到头部购物车上面 就ajax 加载
*/
// 鼠标是否移动到了上方
var header_cart_list_over = 0; 
$("#header_cart_list > .micart > .les").hover(function(){	 
       if(header_cart_list_over == 1) 
			return false;	
        header_cart_list_over = 1; 
		$.ajax({
			type : "GET",
			url:"/index.php?m=Home&c=Cart&a=header_cart_list",//+tab,
			success: function(data){								 
			 	$("#header_cart_list > .micart > .ris").html(data);	
//			 	get_cart_num();
			}
		});			
}).mouseout(function(){
	
	 (typeof(t) == "undefined") || clearTimeout(t); 	 
	 t = setTimeout(function () { 
			header_cart_list_over = 0; /// 标识鼠标已经离开
		}, 1000);		
});
</script>